package ${domainPkg};
import com.bjtct.oom.common.utils.JsonUtils;
import java.io.Serializable;
<#if showStyle=="TREE"||showStyle=="TREE_TABLE">
import java.util.List;
import java.util.ArrayList;
</#if>
<#list list as col>
	<#if col.data_type=="date"||col.data_type=="datetime">
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
	<#break>
	</#if>
</#list>
<#assign gentime = .now>
/**
*${name}模块对应的实体类
*@since ${gentime?string['yyyy-MM-dd HH:mm']}
*@author autogen
*/
@SuppressWarnings("serial")
public class ${name?cap_first}Entity implements Serializable {

<#list list as col>
	//${col.column_comment}
	<#if col.data_type=="date">	
	@DateTimeFormat(iso=ISO.DATE,pattern="yyyy-MM-dd")
	private Date ${col.column_alias} <#if col.is_nullable=="NO"> = new Date()</#if>;	
	<#elseif col.data_type="datetime">
	@DateTimeFormat(iso=ISO.DATE,pattern="yyyy-MM-dd HH:mm:ss")
	private Date ${col.column_alias} <#if col.is_nullable=="NO">= new Date()</#if>;	
	<#elseif col.data_type="int">
	private ${col.data_type} ${col.column_alias}  <#if col.is_nullable=="NO">= -1</#if>;
	<#elseif col.data_type="long">
	private ${col.data_type} ${col.column_alias}  <#if col.is_nullable=="NO">= -1l</#if>;
	<#elseif col.data_type=="float">
	private ${col.data_type} ${col.column_alias}  <#if col.is_nullable=="NO">= 0.0f</#if>;
	<#elseif col.data_type=="double">	
	private ${col.data_type} ${col.column_alias}  <#if col.is_nullable=="NO">= 0.0</#if>;
	<#elseif col.data_type=="boolean">	
	private ${col.data_type} ${col.column_alias}  <#if col.is_nullable=="NO">= false</#if>;
	<#else>
	private ${col.data_type} ${col.column_alias}  <#if col.is_nullable=="NO">= "NONE"</#if>;
	</#if>
</#list>
<#if showStyle=="TREE"||showStyle=="TREE_TABLE">
	private List<${name?cap_first}Entity> children = new ArrayList<${name?cap_first}Entity>();	
</#if>
<#list list as col>
	<#if col.data_type=="date">
	/**
	* get ${col.column_comment}
	*/
	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date get${col.column_alias?cap_first}(){
		return ${col.column_alias};
	}
	/**
	*
	*set ${col.column_comment}
	*/
	public void set${col.column_alias?cap_first}(Date ${col.column_alias}){
		this.${col.column_alias} = ${col.column_alias} ;
	}
	<#elseif col.data_type=="datetime">
	/**
	* get ${col.column_comment}
	*/
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date get${col.column_alias?cap_first}(){
		return ${col.column_alias};
	}
	/**
	*
	*set ${col.column_comment}
	*/
	public void set${col.column_alias?cap_first}(Date ${col.column_alias}){
		this.${col.column_alias} = ${col.column_alias} ;
	}
	<#else>
	/**
	* get ${col.column_comment}
	*/
	public ${col.data_type} get${col.column_alias?cap_first}(){
		return ${col.column_alias};
	}
	/**
	*
	*set ${col.column_comment}
	*/
	public void set${col.column_alias?cap_first}(${col.data_type} ${col.column_alias}){
		this.${col.column_alias} = ${col.column_alias} ;
	}
	</#if>
</#list>
<#if showStyle=="TREE"||showStyle=="TREE_TABLE">
	/**
	* 树节点显示文本
	*/
	public	String getText(){
		return null;
	}
	/**
	* 节点打开关闭,open or closed
	*/
	public String getState(){
		return "closed";
	}
		public List<${name?cap_first}Entity> getChildren() {
		return children;
	}
	public void setChildren(List<${name?cap_first}Entity> children) {
		this.children = children;
	}
</#if>


	@Override
	public String toString() {
		
		return JsonUtils.toString(this);
	}
}